package com.ccl.iot;import com.ccl.iot.IOTInterface.IOTAuthMonitorInterface;
import com.ccl.iot.IOTInterface.IOTAuthMonitorInterface.IOTAuthChangeListener;

public class IOTAuthMonitor extends IOTMonitor<IOTAuthChangeListener> implements IOTAuthMonitorInterface {
	private IOTAuthMonitorInterface iSource = this;

	public IOTAuthMonitor(){
		
	}

	public IOTAuthMonitor(IOTAuthMonitor aSource){
		if (aSource != null){
			iSource = aSource;
		}
	}
	
	@Override
	public boolean addAuthChangeListener(IOTAuthChangeListener aListener) {
		return super.addMonitorListener(aListener);
	}

	@Override
	public boolean removeAuthChangeListener(IOTAuthChangeListener aListener) {
		return super.removeMonitorListener(aListener);
	}

	public void onAuthStateChange(int aNewState){
		int tIndex = 0;
		IOTAuthChangeListener tListener;
		
		while((tListener = super.getMonitorListener(tIndex++)) != null){
//			tListener.onAuthChanged(iSource, aNewState);
		}
	}
}
